Linear Algebra Examples

Simplify the Matrix P(x)=(x^4+2x^2+1)^2Q(x)=(x^2+34x+289)(x+1)
I am unable to solve this problem.